import request from '@/utils/request'

// 获取部门列表接口
export function getDepartments(){
 return request({
  url:'/company/department'
})
}
// 封装实现添加接口
export function addDepartment(data){
 return request({
  url:'/company/department',
  method:'post',
  data
})
}
// 获取部门详情接口
export function getDeparDetail(id){
  return request({
   url:`/company/department/${id}`,
 })
 }
 // 更新部门数据接口
 export function updateDepartments(data){
  return request({
   url:`/company/department/${data.id}`,
   method:'put',
   data
  })
}
 // 删除部门接口
 export function delDepartment(id){
  return request({
   url:`/company/department/${id}`,
   method:'delete',
  })
}


